/**
 *
 *      ___                       ___
 *     /\  \          ___        /\  \
 *    /::\  \        /\  \      /::\  \
 *   /:/\:\  \       \:\  \    /:/\ \  \
 *  /:/  \:\  \      /::\__\  _\:\~\ \  \
 * /:/__/ \:\__\  __/:/\/__/ /\ \:\ \ \__\
 * \:\  \  \/__/ /\/:/  /    \:\ \:\ \/__/
 *  \:\  \       \::/__/      \:\ \:\__\
 *   \:\  \       \:\__\       \:\/:/  /
 *    \:\__\       \/__/        \::/  /
 *     \/__/                     \/__/
 *
 * CIS - Clang Indexing Service is a Project Manager & Source code indexing service
 * created so as to simplify the indexing of C/C++ based source code which use
 * standardized build mechanisms.
 *
 **/

#ifndef APPLICATION_HXX
#define	APPLICATION_HXX

#include "indexserver.hxx"

#include <iostream>
#include <Poco/Util/ServerApplication.h>
#include <Poco/Util/OptionSet.h>
#include <Poco/SharedPtr.h>
#include <Poco/Logger.h>

namespace cis {

class IndexServerApplication : public Poco::Util::ServerApplication {
public:
    IndexServerApplication();

    virtual ~IndexServerApplication();
protected:

    int main(const std::vector<std::string>& args);

    void defineOptions(Poco::Util::OptionSet& options);

    void handleHelp(const std::string&, const std::string&);

    void handleConfigure(const std::string& key, const std::string& filename);

    bool isInteractive() const {
        return false;
    }

    IndexServer *indexServerSubSys;
private:
    IndexServerApplication(const IndexServerApplication& orig);
};

}
#endif	/* APPLICATION_HXX */

